Memory devices, systems, and methods  for updating firmware with single memory device

ABSTRACT

A memory device can include a memory cell array and a remap data structure. A remap data structure can include a mapping history section configured to store sets of mappings between logical addresses and the physical addresses of the regions, and a status section configured to identify one of the sets of mappings as a live set for the device. Control logic can be coupled to the memory cell array and the remap data structure and configured to enable access to the storage locations and remap data structure. Firmware update systems and methods, including firmware-over-the-air (FOTA), that include a memory device are also disclosed.

This application claims the benefit of U.S. provisional patentapplication having Ser. No. 62/597,709, filed on Dec. 12, 2017, thecontents all of which are incorporated by reference herein.

TECHNICAL FIELD

The present disclosure relates generally to systems that update data innonvolatile memories from time to time, and more particularly to systemsthat update firmware images for system use, such as systems utilizingfirmware-over-the-air (FOTA) methods.

BACKGROUND

Firmware-over-the-air (FOTA), and other firmware update methods, can bea key requirement for computing systems. FOTA updates typically need tobe transparent, i.e., old and new FW image are switched instantaneously.Conventionally, systems that need to update firmware employ two or moreseparate flash memory devices that are mapped (e.g., via use of baseregisters) into different ranges of a processor address space. A baseaddress of each different address range controls a single chip select,which selects the desired flash memory device. Thus, the instantaneousswitch occurs by swapping the base addresses stored in the base addressregisters.

FIG. 16A shows a conventional system 1691 that includes FOTA updating.System 1691 can include a microcontroller (MCU) 1693 and multiple flashmemory devices 1695-0 to -2. Storage locations within flash memorydevices (1695-0 to -2) can be mapped to a system address space 1697.Flash memory device 0 1695-0 can correspond to a base address 0x000 andcan store an old firmware image 1607-0 (i.e., an outdated version thathas since been replaced). Flash memory device 1 1695-1 can correspond toa base address 0x100 and can store a current firmware image 1697-1(i.e., a version that is currently accessed by the system). Flash memorydevice 2 1695-2 can correspond to a base address 0x200 and can store anew firmware image 1697-2 (i.e., a version intended to update currentimage 1697-1).

MCU 1693 can update the firmware image using addressing mechanismsinside the MCU 1693. MCU 1693 can have base address registers 1699 thatstore base addresses corresponding to firmware images. Base addressregisters 1699 are used to generate chip select signal CS0-CS2 for flashmemory devices 1695-0 to -2, respectively. Base address register“ba_new_image” can store the base physical address of a new firmwareimage (0x200 before an update). Base address register “ba_cur_image” canstore the base physical address of a current firmware image (0x100before an update). Base address register “ba_old_image” can store thebase physical address of an old firmware image (0x000 before an update).

System 1691 can update from a current image (e.g., 1697-1) to the newimage (e.g., 1697-2) by exchanging values in the base address registers1699. In particular, the value in base address register ba_cur_image canbe switched from “cfg_cur” to “cfg_new”. Following such an operation,when a system 1691 goes to read the firmware, the addressing mechanismsinternal to MCU 1693 will access a base address that generates chipselect signal CS2 (instead of CS1, as was done prior to the updateoperation).

FIG. 16B is a block diagram of a conventional system 1691 showing howchip selects are used. MCU 1693 dedicates an output (e.g., I/O) as achip select (CS1, CS2) for each flash memory device 1695-0/1. Asunderstood from above, such chip selects (CS1, CS2) can be activatedaccording to values in base addresses registers. One flash memory device(e.g., 1695-0) can store a firmware image that is currently in use,while the other flash memory device (e.g., 1695-1) can store a firmwareimage that is not currently in use (i.e., an old firmware image, or anew firmware image to be put in use by switching base address registervalues).

A drawback to conventional FOTA approaches can be cost and limitationsin performance. If a typical controller (e.g., MCU) is used thatdedicates an I/O as a chip select for each flash memory device (i.e.,each firmware image), the controller may not have a free I/O for otherneeded devices, such as dynamic RAM (DRAM) or static RAM (SRAM). As aresult, a controller with additional I/Os may have to be used, which canincrease costs of system. While conventional systems can connectmultiple flash memory devices to the same bus, with each added flashmemory device, capacitive loading on the bus can increase. Thus, thelarger the number of flash memory devices on the bus, the slower the buswill perform. As but one example, for an Octal SPI bus, adding two flashmemory devices can drop maximum bus speed from 200 MHz to 133-166 MHz,as compared the same bus with only one flash memory device.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1A to 1D are a sequence of block diagrams showing a system andfirmware update operations according to an embodiment.

FIG. 2A and 2D are block diagrams showing how update operations caninclude a memory device receiving instructions and/or register writes.

FIG. 3 is a block schematic diagram of a memory device according to anembodiment.

FIG. 4 is a diagram showing a memory device remap data structureaccording to an embodiment.

FIG. 5 is a flow diagram showing a firmware update operation accordingto an embodiment.

FIGS. 6A and 6B show a memory cell array configuration that can beincluded in embodiments.

FIG. 7 is a block diagram showing data structures and a correspondingmemory cell array that can be included in embodiments.

FIG. 8 shows a memory cell array that can be divided into a varyingnumber of pools which can be included in embodiments.

FIGS. 9A to 9D show inputs to a memory device for updating firmwareaccording to embodiments.

FIG. 10 shows a system that can include firmware-over-the-air (FOTA)updating according to an embodiment.

FIG. 11 is a block diagram of a system according to an embodiment.

FIGS. 12A and 12B are perspective views of memory devices according toembodiments.

FIGS. 13A to 13C are diagrams of exemplary devices according toembodiments.

FIG. 14 is a flow diagram of a method according to an embodiment.

FIG. 15 is a flow diagram of a method according to another embodiment.

FIGS. 16A and 16B are diagrams showing a conventional system thatprovide FOTA updating.

DETAILED DESCRIPTION

Various embodiments will now be described that show memory devices,systems, and methods for updating firmware of a system. Updates can beperformed with a single memory device without copying firmware imagesbetween locations on the memory device.

According to embodiments, a new firmware image can be programmed in asame memory device storing a current firmware image. Once the newfirmware image is stored, the memory device can make a switch to a newfirmware image by operation of a switching operation that uses aninternal remapping data structure. Such a switch to a new firmware imagecan be instantaneous.

In the various embodiments below, like items are referred to by the samereference characters, but with the leading digit(s) corresponding to thefigure number.

FIGS. 1A to 1D are a series of flow diagrams showing a system 100 and acorresponding firmware update operation. A system 100 can include amemory device 102, a controller 104, and controller memory 106. A memorydevice 102 can include a nonvolatile memory array 108, remap datastructure 110, and input/output (I/O) and control circuit 112.Nonvolatile memory array 108 can include a number of nonvolatile memorycells that can store data in a nonvolatile manner. That is, in theabsence of power, stored data values can be retained. Storage locationsare accessible via a physical address (PA). Nonvolatile memory array 108can include any suitable type of nonvolatile memory cells, but in someembodiments can include “flash” type memory cells. Nonvolatile memoryarray 108 can have sufficient storage capacity for at least two or morefirmware images.

Remap data structure 110 can store data that records a logical addressto physical address (LA->PA) mapping of firmware images, as well as astatus for each such LA->PA mapping. For example, entry 110-0 stores amapping (LA_FW=PAx) that is valid, as shown by the VAL indication. Entry110-1 stores a mapping that is not valid, as shown by the INVindication. It is noted that remap data structure 110 resides on thememory device 102, and stores data in a nonvolatile fashion. As will beshown in other embodiments below, in some embodiments, remap datastructure 110 can include a LA->PA look-up or other structure that isstored in volatile memory (not shown) for fast translation betweenlogical and physical addresses. Remap data structure 110 can utilizenonvolatile memory cells located outside of nonvolatile memory array 108and/or nonvolatile memory cells located within nonvolatile memory array108.

In some embodiments, memory device 102 can be a single integratedcircuit device. In such an arrangement, nonvolatile memory array 108,remap data structure 110, and I/O and control circuit 112 can be part ofthe same integrated circuit package. In particular embodiments,nonvolatile memory array 108, remap data structure 110 and I/O andcontrol circuit 112 can be part of the same integrated circuit substrate(i.e., formed in a single “chip”).

I/O and control circuit 112 can enable access to nonvolatile memoryarray 108 and remap data structure 110. For accesses to firmware storedin nonvolatile memory array 108, I/O and control circuit 112 can useremap data structure 110 to determine which LA->PA mapping is valid, andthen use such a mapping to direct logical addresses to physicaladdresses of the valid firmware image.

In some embodiments, in response to predetermined actions (e.g.,power-on/reset POR, a received instruction, a register setting), memorydevice 102 can access remap data structure 110 to create a LA->PAmapping structure in volatile memory (not shown).

A controller 104 can include logic circuits for executing variousfunctions of system 100. In some embodiments, controller 104 can includeone or more processors and related circuits that can execute storedinstructions 116. However, alternate embodiments can include any othersuitable circuits, including custom logic and/or programmable logic. Acontroller 104 can have access to a controller memory 106 which isdifferent from memory device 102. A controller memory 104 can be formedof any suitable memory circuits, and in particular embodiments can be avolatile memory, such as dynamic random access memory (DRAM) or staticRAM (SRAM).

Having described components of a system 100, an update operation forsystem 100 will now be described.

Referring to FIG. 1A, a system 100 may initially store a currentfirmware image 114 in nonvolatile memory array 108 starting at aphysical address PAx. During system operations, the current firmwareimage 114 is read from memory device 102 by I/O and control circuit 112translating logical addresses (which can start at LA_FW) to physicaladdresses (which can start at PAx) by accessing remap data structure110.

Referring still to FIG. 1A, a system 100 can receive a new firmwareimage (shown by action 103). Controller 104 can store the new firmwareimage 118 in controller memory 106. New firmware image 118 can bereceived from a network 120. In some embodiments, network 120 can be awireless network, and an update operation can be a FOTA operation.

Referring to FIG. 1B, controller 104 can program the new firmware image118 into nonvolatile memory array 108. It is understood that newfirmware image 118 is programmed into physical locations not occupied bycurrent firmware image 114. In the embodiment shown, new firmware image118 can occupy a range of a physical addresses starting at PAy that donot overlap with the physical addresses storing the current firmware 114starting at PAx. New firmware image 118 can be programmed according toany technique suitable for the type and architecture of the nonvolatilememory array 108. In some embodiments, physical addresses for newfirmware image 118 can be generated by controller 104. However, in otherembodiments, such physical addresses can be generated by I/O and controlcircuit 112 in response to one or more instructions from controller 104.

Referring to FIG. 1C, controller 104 can also program a logical tophysical address mapping of the new firmware image 118 into remap datastructure 110. Such an action is shown in FIG. 1C by “LA_FW=PAy” beingprogrammed into entry 110-1. In this way, logical address intended toaccess firmware for the system 100 can be assigned physical addresses ofthe new image 118. However, as shown in FIG. 1C, such a mapping will notbe effect, as entry 110-1 continue to have an invalid status.

Referring to FIG. 1D, controller 104 can make a new firmware image“live” by programming the new mapping entry to be valid. Such an actionis shown in FIG. 1D by entry 110-1 being changed to valid (VAL.) andentries 110-0 becoming invalid. As shown in nonvolatile memory array108, once the new mapping is live, the firmware image at PAx becomes aninvalid (e.g., outdated) firmware image 115, and the firmware image 118at PAy becomes the current firmware image, to be accessed by the system.

Once a new firmware image becomes valid (e.g., is live), it can beaccessed immediately, or in response to predetermined conditions. As buta few of many possible examples, the new mapping can take effect afterany or all of the following: a next power-up or reset (POR) operation ofthe device or system, the memory device 102 receiving a predeterminedinstruction, or a predetermined value being written into a configurationregister (not shown) of the memory device 102.

An operation like that shown in FIGS. 1A to 1D can enable an update tofirmware to be transparent and immediate, and not require a copying ofdata between locations within a same memory device. It is noted that insome embodiments, a memory device 102 can retain two locations forfirmware, and “swap” between the two with each new firmware image.However, in other embodiments a memory device 102 can include more thantwo storage locations for firmware, and cycle among the variouslocations as new firmware is received.

While a controller 104 can track the physical addresses for firmwarelocations, in some embodiments, I/O & control logic 112 can handle suchtasks, generating physical addresses for firmware data values receivedfrom a controller 104.

Embodiments shown herein can include various actions executed by amemory device, including the programming of firmware data intononvolatile memory array locations, the programming of values into aremap data structure (e.g., LA to PA mapping data, status values, etc.),and making a new version of the firmware “live” (i.e., available to thesystem). While such actions can be accomplished in any suitable way,FIGS. 2A and 2B show two approaches according to embodiments.

FIGS. 2A and 2B are block diagrams of memory devices 202 and 202′. Inparticular embodiments, memory devices 202/202′ can be particularimplementations of those shown as 102 in FIGS. 1A to 1D.

FIG. 2A shows the writing of data to a configuration register 222 in amemory device 202. Memory device 202 can include an I/O circuit 212-0,control logic 212-1, remap data structure 210, and a configurationregister 222. A data value DATA can be written to configuration register222 to start or enable an action in a firmware update operation. As buta few examples, according to the register setting any or all of thefollowing can happen: a new firmware image can be made “live”, PA->LAmapping data (210-x) can be programmed, the memory device can be placedinto a mode which enables PA->LA mapping data to be programmed, thememory device can be placed into a mode which enables a controller toprogram the new firmware into storage locations (i.e., access physicaladdressing). Writing to the configuration register 222 can includeproviding memory device with data and a register address (DATA+ADD).Further, such an action can also include an instruction (e.g., writeregister, etc.).

FIG. 2B shows a memory device 202′ receiving particular instructions forfirmware update operations. Memory device 202′ can include the sameitems as that of FIG. 2A. However, unlike FIG. 2A, actions in a firmwareupdate operation can be effected by a dedicated instruction to thememory device 202′. Accordingly, control logic 212-1 can include aninstruction decoder 224. In response to one or more instructions,control logic 212-1′ can perform any of the actions noted for theregister write of FIG. 2A (i.e., make new firmware live, etc.). In someembodiments, an instruction (INST) can be accompanied by one or moredata values (+DATA).

FIG. 3 is a block diagram of memory device 302 according to a furtherembodiment. In particular embodiments, FIG. 3 can be one implementationof that shown as 102 in FIGS. 1A to 1D, or those shown in FIGS. 2A/B.

Memory device 302 can include an I/O circuit 312-0, control logic 312-1,remap data structure 310, a memory cell array 308, X and Y decoders 334and 336, and data latch 338. I/O circuit 312-0 can provide any suitableinterface for memory device 302, and in the very particular embodimentshown, can include a chip select input CS, a clock input CLK, a serialI/O (SI/O0), and optionally one or more additional serial I/Os (SI/On).According to well understood techniques, a memory device 302 can beaccessed by an active CS signal, and can receive any of instructions,address values, or data values on SI/O0 (and SI/On) in synchronism witha clock received at CLK. However, such a particular interface should notbe construed as limiting. Alternate embodiments can include an I/Ocircuit with various interfaces, including those with dedicated addressand data lines, asynchronous timing, parallel buses, etc.

Remap data structure 310 can store data, in a nonvolatile fashion, totrack and enable access to a latest firmware image. In the embodimentshown, remap data structure 310 can include pointer data 328, remaphistory data 330, and a map memory 332. Remap history data 330 can storeLA->PA mapping data for each new firmware image as it is programmed intomemory cell array 308. Thus, remap history data 330 can store a historyof all mappings for a particular firmware (where an oldest entry mayeventually be overwritten). Pointer data 328 can point to the mostrecent remap history data entry, and thus the entry of the most recentfirmware image. Data in map memory 332 can be accessed at a faster speedthan remap history data 330 and can be configured to provide rapidLA->PA conversion. In some embodiments, map memory 332 can be a volatilememory structure that is populated with remap history data 330 pointedto by pointer data 328. In some embodiments, pointer data 328 and remaphistory data 330 are stored in nonvolatile memory circuits. Suchnonvolatile memory circuits can be part of memory cell array 308 orseparate from memory cell array 308. Map memory 332 can include volatilememory circuits, such as SRAM and/or DRAM.

Control logic 312-1 can execute operations of the memory device 302according to signals received at I/O circuit 312-0. In the embodimentshown, control logic 312-1 can include POR circuit 326, instructiondecoder 324, and configuration registers 322. POR circuit 326 can detectand/or initiate a power-on or reset operation. Instruction decoder 324can decode instructions received at I/O circuit 312-0. Configurationregisters 322 can store configurations data that can dictate how memorydevice 302 operates. In some embodiments, a new firmware image can beplaced in operation in response to any of: POR circuit 326 detecting apower on or reset event, the decoding of one or more instructions byinstruction decoder 324, or the writing of a predetermined data valueinto configuration registers 322. Placing the new firmware image intooperation can include control logic 312-1 accessing pointer data 328 tofind the LA->PA mapping for the most recent firmware from remap historydata 330. Control logic 312-1 can then create a LA->PA lookup structurein map memory 332 from the remap history data 330. Control logic 312-1then access map memory 332 to service read requests made to firmwarelogical addresses.

A memory cell array 308 can include nonvolatile memory cells accessedaccording to physical addresses decoded by X and Y decoders (334/336).Nonvolatile memory cells can be of any suitable technology, and inparticular embodiments can be single transistor “flash” type memorycells. Memory cell array 308 can have any suitable organization, and inparticular embodiments can be organized in sectors.

Data latch 338 can store read data received from memory cell array 308for output by control logic 312-1 over SI/O0 (and SI/On if present).Data latch 338 can also store write data received over SI/O0 (and SI/Onif present), for programming into memory cell array 308 by control logic312-1.

FIG. 4 is a diagram showing a remap data structure 410 according to oneparticular embodiment. Remap data structure 410 can be one particularimplementation of those shown for other embodiments herein. Remap datastructure 410 can include pointer data (FR_VEC) 428, remap history data(SMFLASH) 430, and map memory (SMRAM) 432. Pointer data 428 can includea bit value that indexes to each entry in remap history data 430. Thelast bit value of pointer data 428 having a “0” value can be the latestentry. Thus, in FIG. 4, pointer data 428 indexes to entry “n-1” asstoring the LA->PA mapping for the newest firmware version. Thus, thedata stored in map memory 432 is understood to be derived from datastored in entry n-1 of remap history data 430.

When a new firmware image is received, its LA->PA mapping can beprogrammed into entry “n”, and to make such a new firmware image “live”the pointer bit value for index n can be changed from 1 to 0.

Having described various systems, devices, and corresponding methodsabove, another method will now be described with reference to FIG. 5.FIG. 5 is a flow diagram of a method 540 of updating firmware with acontroller and a single memory device. A method 540 can be executed byany of the systems described herein, and equivalents. In method 540 amemory device can be flash memory device, but other embodiments caninclude nonvolatile storage based on any other suitable technology.

Method 540 can include a memory device experiencing an initializingevent, which in the embodiment shown can be a POR type event 540-0. Inresponse to such an event, a memory device can load an LA->PA mappingfrom a remap history (e.g., SMFLASH) into map memory (e.g., SMRAM).Other initializing events that can result in the same operation(populating SMRAM) can include specific instructions or commands to thememory device, or the setting of one or more configuration registers ofthe memory device, as but a few examples.

A controller (e.g., MCU) can boot a current firmware image 540-2. Suchan action can include a controller setting LAs to values of the lastknown firmware image. In addition, a controller may also have record ofthe physical addresses (in the memory device) of the latest image. Inthe embodiment shown, it is assumed that current logical addresses equalthe current physical addresses. In FIG. 5, the current firmware image isunderstood to be stored in sectors “C” which includes physical addressesc1, c2, etc.

A controller can receive a new firmware image 540-4. Such an action caninclude any of those described herein, or equivalents, includingreceiving the new firmware image over a wireless connection and storingit in a controller memory (RAM).

A controller can program the new firmware into the memory device 540-6.Such an action can include the controller assigning and recordinglogical and physical addresses for the data. In the embodiment shown, itis assumed that the assigned logical addresses equal the assignedphysical addresses. In FIG. 5, the new firmware image is understood tobe stored in sectors “N” which includes physical addresses n1, n2, etc.Sectors “N” are understood to be different from and not overlap withsectors “C”. Action 540-6 shows how in some embodiments, the LA->PAmapping can be exposed to an application/user.

A controller can then update remap history data (SMFLASH) on the memorydevice to store the new firmware image location 540-8. Such an actioncan include a controller exchanging logical addresses of the currentfirmware image with those of the new firmware image. In FIG. 5, this caninclude multiple logical address swaps.

A method 540 can further include a controller making the firmware update“live” by setting a valid bit in the memory device 540-10. In FIG. 5this can include setting a bit in a data structure like that of FIG. 4(i.e., a bit value in pointer FR_VEC).

With the new firmware image live, when the memory device experiencesanother initializing event 540-0 (e.g., POR, specialinstruction/command, configuration register write), the controller willboot the new image, i.e., LA(cur_img)=N with N=(n1, n2, . . . ). Thefirmware update is thus immediately in effect.

FIGS. 6A and 6B are diagrams showing configurations for a memory cellarray 608 that can be included in embodiments. FIG. 6A shows a memorycell array 608 that is physically divided into different pools 642,644-0, 644-1. Each pool (642, 644-0, 644-1) is addressable by a pointer(WL_PTR0 to 2), which can point to a base address for the pool. One pool642 can be designated as a firmware pool 642, having a size that canaccommodate at least two firmware images. As shown, firmware pool 642can be programmed with a new firmware image 618 (at physical addressesn0 to ni) while still storing a previous firmware image 614 (at physicaladdresses c0 to ci). In some embodiments, as firmware is continuallyupdated, locations can be swapped. For example, once new firmware image618 is made live, it will become the current firmware image, and thenext, new firmware image will be programmed at physical addresses c0 toci.

FIG. 6B shows a swapping operation. A logical address for a new firmwareimage is stored as a temporary value (tmp=LA(new_img)). The logicaladdress for a new firmware image is set to that of the current firmwareimage (LA(new_img)=LA(cur_img)). Such an action designates the (nowoutdated) current firmware image, as the destination for the next, newfirmware image. The newly received firmware image is then set as thecurrent firmware image (LA(cur_img)=tmp).

Of course, in other embodiments, a firmware pool 642 can accommodatemore than two firmware images, and thus updates will rotate throughaddress ranges rather than swap between just two address ranges.

Referring back to FIG. 6A, in some embodiments, the pools (642, 644-0,644-1) can be wear leveling pools. A memory device that includes memorycell array 608 can change logical to physical address mapping to evenout wear among the pools. In some embodiments, a firmware pool 642 canbe treated as any other pool (e.g., 644-0/1) in a wear levelingoperation. That is, once accesses to firmware pool 642 have exceededsome predetermined threshold, a new pool (e.g., 644-0/1) can bedesignated as the firmware pool. In such embodiments, firmware imagescan be stored in a same pool to avoid losing mapping data if a wearleveling operation cycles a pool out of operation and substitutes itwith a different pool.

Referring to FIG. 7, a memory device 702 according to another embodimentis shown in a block diagram. A memory device 702 can be one particularimplementation of any of those shown herein. A memory device 702 caninclude a memory cell array 708 divided into pools 742/744-0 to -k. Foreach pool (742/744-0 to -k) there can be corresponding remap structure710-0 to -k. Remap structures (710-0 to -k) can take the form of any ofthose described herein, or equivalents, and in FIG. 7 are shown to havea structure like that of FIG. 4.

In some embodiments, pools (742/744-0 to -k) can be wear leveling pools,and thus subject to be rotated out of use based on wear levelingcriteria. In memory device 702 of FIG. 7, any pool (742/744-0 to -k) canserve as firmware pool as there is a corresponding remap data structurefor that pool.

In some embodiments, a memory cell array can have physical regions ofprogrammable size. FIG. 8 shows one example of such a memory cell array808. Memory cell array 808 can include a number of storage locationsdividable into different regions, shown as pools 842/844. A size andphysical location of the pools can be programmable according to apointer value (WL_PTR0 to -2), which can point to a base physicaladdress. In some embodiments, such pools can be wear leveling pools.Thus, accesses to such pools can be monitored or otherwise tracked tocycle out a pool that has been subject to more use than other pools, andremap addresses to a new, less worn pool.

FIG. 8 includes examples 848 of how a memory cell array 808 can bedivided using pointer values (WL_PTR0 to -2). Examples 848 include onlyone pool, two pools, and three pools. Of course, any number of poolscould be created, provided sufficient pointer values are available. Insuch an arrangement, a pool can be adjusted in size according tofirmware size (i.e., made large enough to store at least two images).

According to embodiments, memory devices can store mapping datastructures which can be accessed and revised to enable rapid switchingfrom a current firmware image to a newly received firmware image. Whilememory devices can be accessed in any suitable way, and according to anysuitable protocol, in some embodiments a memory device can be accessedwith a chip select signal (CS) and one or more I/O lines. FIGS. 9A to 9Dare timing diagrams showing inputs signals to a memory device forupdating firmware according to embodiments. In response to such inputsignals, a memory device can perform any of: make a new firmware image“live”, update remap history data (e.g., add a new LA->PA mapping),prepare the memory device for the programming of a new firmware image.

Each of FIGS. 9A to 9D shows waveforms for a chip select signal (CSB)and I/O signal(s) (I/O). An I/O can be one I/O line of the memorydevice, or multiple such I/O lines. In the example shown, data on I/Olines can be received in synchronism with a clock CLK. A data rate fordata received on I/O can take any suitable form, including single datarate (one bit cycle), double data rate (two bits per cycle), quad datarate (two bits per cycle on two I/O lines), or octal data rate (two bitsper cycle on four I/O lines).

FIG. 9A shows a register write instruction. At time t0, a chip selectsignal can go active. At time t1, memory device can receive aninstruction “WriteRegX”. This can be followed by configuration data(DATA(Reg)) at time t2. In response to such an instruction, a memorydevice can write DATA(Reg) into one or more registers indicated by theinstruction WriteRegX. Writing data into such registers can control,provide data for, or initiate firmware update operations as describedherein, or equivalents.

FIG. 9B shows an addressable register write instruction. At time t0, achip select signal can go active. At time t1, memory device can receivean instruction “WriteAddReg”. This can be followed by address data (ADD)at time t2, and then configuration data DATA at time t3. In response tosuch an instruction, a memory device can write DATA into the registerindicated by the address data (ADD). Writing data to such a register cancontrol, provide data for, or initiate firmware update operations asdescribed herein, or equivalents.

FIG. 9C shows a mapping instruction according to an embodiment. At timet0, a chip select signal can go active. At time t1, a memory device canreceive an instruction “NewMap”. This can be followed by data (DATA(Map)at time t2. In response to such an instruction, mapping data (e.g.,LA->PA mapping) for a new image can be stored in a remap history datastructure, as described herein, or equivalents. Values DATA(Map) caninclude the mapping data.

FIG. 9D shows an instruction to make a new firmware image live accordingto an embodiment. At time t0, a chip select signal can go active. Attime t1, a memory device can receive an instruction “NewMapLive”.Optionally, this can be followed by data (DATA(Ptr)). In response tosuch an instruction, a newest set of mapping data can be indicated asthe firmware image that is to be provided going forward. In someembodiments, no data is needed, as a memory device control logic canupdate the value for the new mapping set. However, in other embodiments,DATA(Ptr) can be used to program a remap data structure (e.g., pointervalues). Such an instruction can swap between firmware images in anatomic, immediate fashion.

While embodiments can include systems, devices and methods that involvethe update of firmware for device or module, embodiments can alsoinclude systems having multiple devices/modules that can each requiretheir own firmware update. FIG. 10 is a block diagram of one such system1000.

A system 1000 can include a telematics control unit (TCU) (e.g.controller) 1004, a controller bus 1050, a systems development lifecycle section 1052, module buses 1054-0 to -2, and modules 1055-0 to -1.Each of modules (1055-0 to -1) operates with firmware stored in a memorydevice 1002-0 to -2. A TCU 1004 can include a processor which can issueinstructions to memory devices (1002-0 to -2). TCU 1004 can also includea wireless transceiver (or receiver) 1058 for receiving firmware updatesvia a wireless network. In particular embodiments, a system 1000 can bean automobile control system, and TCU 1004 may further include a globalpositioning system (GPS), one or more processors, and a controllermemory.

While FIG. 10 shows separate module buses 1054-0 to -2, in otherembodiments, more than one module can be connected to a same bus.Further, in other embodiments, a controller bus 1050 can be the same asa module bus (1054-0 to -2).

Having described various components of system 1000, FOTA operations forthe system 1000 will now be described.

Initially, memory devices 1002-0 to -2 can each store a current firmwareimage 1014/1015 (that is to be updated).

At {circle around (1)}, TCU 1004 can receive new firmware at wirelesstransceiver 1058 that is transmitted over a wireless connection 1057 ofnetwork 1020. A network 1020 can any suitable network, and in someembodiments can be the Internet and/or a cellular network. In theexample shown, new firmware can be received for all modules 1055-0 to-2. However, it is understood that in other update operations fewernumbers of modules may be updated.

At {circle around (2)}, TCU 1004 can transmit the new firmware images tothe respective memory devices 1055-0 to -2. Such an action can includeTCU 1004 sending new firmware image over controller bus 1050 and modulebuses 1054-0. In one embodiment, such an action can include transmittingdata over a controller area network (CAN) type bus.

At {circle around (3)}, modules 1055-0 to -2 can program a new firmwareimage 1018/14 into locations of the corresponding memory device 1002-0to -2. Such an action can include any of those described herein, orequivalents. In one particular embodiment, new firmware image 1018/14can be programmed into a “secondary” memory page of the memory device(the primary memory page storing the current firmware 1014/15). In someembodiments, the programming of the new firmware image can beaccomplished with a processor (not shown) local to the module 1055-0 to-2. However, in other embodiments, such programming can be performed byTCU 1004.

At {circle around (4)}, the new firmware images 1018/1014 can be made“live” (and the other firmware images 1014/1015 designated as inactive).Such an action can be in response to inputs received from a TCU 1004.Such inputs can include, but are not limited to, instructions orregister writes as described herein, or equivalents, as well asout-of-band signaling or actions by a processor local to modules 1055-0to -2, or any other suitable signaling method.

FIG. 11 is a block diagram of a system 1100 according to anotherembodiment. A system 1100 can include a controller (MCU) 1104 and amemory device 1002. Memory device 1002 can enable switching between atleast two different firmware images (1114, 1118). As shown, controller1104 can provide two chip select outputs (CS1, CS2) as in theconventional system shown in FIG. 16B. However, because memory device1002 can manage switching between firmware images with a single memorydevice 1002 and single chip select (CS1), controller 1104 can have anextra chip select output CS2 available for other applications.

While embodiments can include systems with memory devices operating inconjunction with one or more controller devices, embodiments can alsoinclude standalone memory devices capable of enabling internal switchingbetween different firmware images as described herein, and equivalents.While such memory devices can include multiple integrated circuitsformed in a same package, in some embodiments memory devices can beadvantageously compact single integrated circuits (i.e., chips). FIGS.12A and 12B show two packaged single chip memory devices 1202A and1202B. However, it is understood that memory devices according toembodiments can include any other suitable packaging type, includingdirect bonding of a memory device chip onto a circuit board substrate.

Referring to FIGS. 13A to 13C, various devices according to embodimentsare shown in series of diagrams. FIG. 13A shows an automobile 1360A thatcan have numerous sub-systems (two shown as 1300A-0 and 1300A-1) thatoperate with updatable firmware. Such sub-systems (1300A-0, 1300A1) caninclude an electronic control unit (ECU) and/or an advanced driverassistance system (ADAS). However, in other embodiments such sub-systemscan include a dashboard display/control sub-system and/or aninfotainment sub-system, as but two of numerous possible examples. Eachsubsystem (1300A-0, 1300A1) can include a controller and memory deviceand employ firmware operations as described herein, or equivalents,including FOTA type updates.

FIG. 13B shows a handheld computing device 1360B. Handheld computingdevice 1360B can include a system 1300B, having a memory device 1302 andcontroller 1304 (not shown to scale) for performing firmware updates forthe device 1360B as described herein, or equivalents.

FIG. 13C shows a controller device 1360C. Controller device 1360C can bea device deployed to control industrial or residential operations. Asbut a few of many possible examples, controller device 1360C can controlmachinery on a manufacturing line, be an electronic lock for a building,control a consumer appliance, control a lighting system, or control anirrigation system. Device 1360C can include a system 1300C, having amemory device 1302 and controller 1304 (not shown to scale) forperforming firmware updates for the device 1360C as described herein, orequivalents.

Referring now to FIG. 14, a method 1462 according to an embodiment isshown in a flow diagram. A method 1462 can include receiving newfirmware data at a memory device that stores firmware for a system1462-0. Such an action can include a memory device receiving program orwrite instructions for the firmware data via an interface on the memorydevice. In particular embodiments, such an action can include a memorydevice receiving instructions from a controller to program the firmwaredata at predetermined physical addresses.

Received firmware data can be programmed into nonvolatile memory cellsat locations different from those that store current firmware 1462-2. Inparticular embodiments, such an action can include a memory deviceprogramming firmware data into one or more sectors of a flash memoryarray having an address range designated for the new firmware, anddifferent from address ranges which stores current firmware.

It is noted that such an operation does not include the copying offirmware data from one location in the memory cell array of memorydevice to another location of the memory cell array in the same memorydevice.

A method 1462 can also include programming a new LA->PA mapping for thenew firmware into nonvolatile storage on the memory device 1462-4. Insome embodiments, such an action can include programming such data intoa remap history data structure which retains such mappings for previousfirmware versions.

A method 1462 can also include programming a nonvolatile status value onthe memory device to indicate the new LA->PA mapping is for the latestfirmware version 1462-6. In some embodiments, such an action can includeprogramming values of a pointer data structure which points to an entryin a remap history data structure.

FIG. 15 shows a method 1564 according to another embodiment in a flowdiagram. A method 1564 can be a FOTA method and can include determiningwhen data for a new firmware image is received over a wirelessconnection 1564-0. Such an action can include a controller detectingwhen a wireless receiver of the system receives a firmware update.

If no new firmware image data is received (N from 1564-0), a method 1564can access firmware as needed from a look-up structure 1564-18. In someembodiments, such an action can include a memory device receiving readrequests to logical addresses of the firmware, and such logicaladdresses being translated into physical addresses with data from thelook-up structure. In particular embodiments, the look-up structure canreside in volatile memory. It is understood that at this time, thesystem look-up structure corresponds to a current firmware image (whichis to be superseded by any newly received firmware image).

If new firmware image data is received (Y from 1564-0), the new firmwareimage data can be stored in system memory 1564-2. In some embodiments,such an action can include storing the new firmware image data in avolatile system memory, such a DRAM or SRAM, accessed by a controller,or the like.

A program operation of a memory device in the system can be initiated1564-4. Such an action can include determining which particular memorydevice is to store the new firmware image. In some embodiments, such anaction can include a controller issuing an instruction or the like tothe memory device. The new firmware image can be programmed intononvolatile sectors of the memory device at locations different fromthose that store a current firmware image 1564-6. Such an action caninclude a controller programming the firmware image stored in systemmemory into nonvolatile storage locations of the memory device.

An LA->PA mapping for the new firmware image can programmed intononvolatile storage of the memory device 1564-8. Such an action caninclude any of those describe herein or equivalents, includingprogramming such data into a remap history data structure which canretain mappings of previous firmware images in the same memory device.

A pointer to the new LA->PA mapping can be programmed 1564-10. Such anaction can include any of those describe herein or equivalents,including setting a bit in a multi-bit value that corresponds to anentry in a remap history data structure. Such a pointer can be stored ina nonvolatile store of the memory device.

A method 1564 can determine if a reset-type event has occurred 1564-12.A reset-type event can be an event that causes memory device to resetlogical address mapping from the current firmware image to the newlyprogrammed (and “live” firmware image. A reset-type event can take anysuitable form, including but not limited to, a POR event, the memorydevice receiving a particular instruction or register write, or a signalat a special input pin, to name only a few.

If a reset-type event is determined to not have occurred (N from1564-12), a method 1564 can continue to access firmware with the look-upstructure 1564-18, which can continue to be the firmware image to besuperseded by the newly received firmware image.

If a reset-type event is determined to have occurred (Y from 1564-12), amemory device can access the latest LA->PA mapping set with the pointer1564-14 (which corresponds to the newly received firmware image). Amemory device can then create a new LA->PA look-up structurecorresponding to the new firmware image 1564-16. As result, firmwareaccesses of 1564-18 will now be to the new firmware image.

Embodiments as described herein, can include an application programminginterface (API) that can be called to execute a firmware image update asdescribed herein. or equivalents. A new firmware image can be loadedinto some arbitrary address range (addr_new_img) in a memory devicewhich stores a current firmware image in another address range(addr_cur_img). An API can use such address information to execute afirmware update. For example, an API can have the form of“fota_switch(addr_cur_img, addr_new_img)”.

Such an arrangement can enable firmware to be “relocated” within anaddress space of a memory device (i.e., switch from accessing the oldfirmware to accessing the new firmware) without having to copy firmwaredata from one location to another in the memory device (e.g., thefirmware data is written/programmed once). The relocation operation canbe atomic (i.e., a single bus transaction) and essentiallyinstantaneous. For example, as noted herein, an instruction or registerwrite to the memory device can put the remapping to the new firmware inplace.

Embodiments of the invention can advantageously reduce or eliminate theuse of multiple flash memory devices to store different firmware images,as different firmware images can be stored in one memory device, capableof making an immediate switch to a new image once it is stored. This canreduce the cost of systems, as fewer memory devices are needed. Inaddition, systems that would normally include multiple flash device withdifferent firmware images on a same bus, can achieve a same result withonly one device (or a fewer number of devices) on the bus. This canreduce bus capacitance, increasing performance of a system (i.e.,increasing bus speeds).

Embodiments of the invention can allow for a system to provideinstantaneous switching between firmware images with one memory deviceconnected to one chip select output. This can reduce costs, ascontroller devices with fewer chip select outputs can be used. Inaddition or alternatively, there can be greater freedom in systemdesign, as one or more chip select outputs will now be free for otheruses (i.e., uses other than accessing a firmware image).

These and other advantages would be understood by those skilled in theart.

It should be appreciated that reference throughout this specification to“one embodiment” or “an embodiment” means that a particular feature,structure or characteristic described in connection with the embodimentis included in at least one embodiment of the present invention.Therefore, it is emphasized and should be appreciated that two or morereferences to “an embodiment” or “one embodiment” or “an alternativeembodiment” in various portions of this specification are notnecessarily all referring to the same embodiment. Furthermore, theparticular features, structures or characteristics may be combined assuitable in one or more embodiments of the invention.

Similarly, it should be appreciated that in the foregoing description ofexemplary embodiments of the invention, various features of theinvention are sometimes grouped together in a single embodiment, figure,or description thereof for the purpose of streamlining the disclosureaiding in the understanding of one or more of the various inventiveaspects. This method of disclosure, however, is not to be interpreted asreflecting an intention that the claims require more features than areexpressly recited in each claim. Rather, inventive aspects lie in lessthan all features of a single foregoing disclosed embodiment. Thus, theclaims following the detailed description are hereby expresslyincorporated into this detailed description, with each claim standing onits own as a separate embodiment of this invention.

What is claimed is:
 1. A memory device, comprising: a memory cell arrayhaving a plurality of storage locations accessible via physicaladdresses, the storage locations arranged into separate regions; a remapdata structure that includes a mapping history section configured tostore sets of mappings between logical addresses and the physicaladdresses of the regions, and a status section configured to identifyone of the sets of mappings as a live set for the memory device; andcontrol logic coupled to the memory cell array and the remap datastructure, configured to enable access to the storage locations andremap data structure.
 2. The memory device of claim 1, furtherincluding: a volatile memory circuit configured to store a logicaladdress to physical address mapping of the live set; and wherein thecontrol logic is configured to access the volatile memory circuit inresponse to received logical addresses.
 3. The memory device of claim 1,wherein the control logic further includes an instruction decoderconfigured to enable access to the remap data structure in response to areceived instruction.
 4. The memory device of claim 1, wherein thecontrol logic further includes at least one configuration registeraccessible via a register write operation to the memory device, the atleast one configuration register configured to store any selected fromthe group of: data for the mapping history section and data for the mapindicator section.
 5. The memory device of claim 1, wherein the controllogic further includes a power-on reset circuit configured to set alogical address of the live set as a most current address for firmwarestored in the memory device in response to a power-on or reset event inthe memory device.
 6. The memory device of claim 1, further including aninput/output (I/O) section that includes at least one chip select input,at least one clock input, and at least one bi-direction serial data I/O.7. The memory device of claim 1, wherein: the memory cell arraycomprises flash memory cells arranged into pools, the separate regionsbeing located in a first pool; wherein the control logic is configuredto vary accesses to the remaining pools according to a wear levellingalgorithm.
 8. The memory device of claim 1, wherein: the memory cellarray comprises flash memory cells arranged into pools, the separateregions being located in a first pool; wherein the control logic isconfigured to vary accesses to the separate regions according to a wearlevelling algorithm.
 9. A method, comprising: receiving a new firmwareimage at a memory device; programming the new firmware image intononvolatile storage locations of the memory device, the storagelocations for the new firmware image being in the same memory device butat different storage locations than a current firmware image stored bythe memory device; programming a set of logical address (LA) to physicaladdress (PA) mappings for the new firmware image into nonvolatilemapping circuits of the memory device, the mapping circuits alsoincluding a set of LA to PA mapping for the current firmware image; andprogramming a status value into nonvolatile status circuits of thememory device to indicate the set of LA to PA mapping for the newfirmware image as a valid firmware image stored by the memory device,and the set of LA to PA mapping for the current firmware image as aninvalid firmware image.
 10. The method of claim 9, wherein programmingthe new firmware image into nonvolatile storage locations of the memorydevice includes programming sectors of a flash memory device.
 11. Themethod of claim 9, wherein programming the status value includesprogramming at least one bit in a multi-bit pointer data structurehaving one bit for each set of LA to PA mappings stored in the memorydevice.
 12. The method of claim 9, wherein programming the set of LA toPA physical address mapping for the new firmware image includes anaction selected from the group of: receiving a predetermined instructionand data at the memory device and writing data to at least onepredetermined register of the memory device.
 13. The method of claim 9,wherein programming the status value for the new firmware image includesan action selected from the group of: receiving a predeterminedinstruction and data at the memory device and writing data to at leastone predetermined register of the memory device.
 14. The method of claim9, further including: in response to predetermined conditions,generating a LA to PA mapping in a volatile memory from the set of LA toPA mapping of the new firmware image, and accessing the volatile memoryto read data from the new firmware image.
 15. The method of claim 14,wherein the predetermined conditions include any selected from the groupof: a power-on or reset operation for the memory device, receiving apredetermined instruction at the memory device, and writing data to atleast one predetermined register of the memory device.
 16. A system,comprising: a nonvolatile memory device including a memory cell arrayhaving regions with different physical addresses for storing differentfirmware images for the system, a mapping history section configured tostore, in nonvolatile storage circuits, logical address (LA) to physicaladdress (PA) mappings for received firmware images, and a firmwarestatus section configured to store, in nonvolatile storage circuits,data identifying a current firmware image to be accessed by the system;and a processor circuit configured to execute stored processorinstructions to store a new firmware image in a system memory, programthe new firmware image from the system memory to one of the regions inthe nonvolatile memory device without disturbing the current firmwareimage stored in the nonvolatile memory device, program a LA to PAmapping for the new firmware image in the mapping history section of thenonvolatile memory device, and program the firmware status section toindicate that the LA to PA mapping for the new firmware image is to beread by the system to access firmware data, as opposed to any previousversions of firmware image stored in the nonvolatile memory device. 17.The system of claim 16, further including a wireless transceiverconfigured to receive the new firmware image over a wireless network.18. The system of claim 16, wherein programming the LA to PA mapping forthe new firmware image includes any selected from the group of: theprocessor issuing a predetermined instruction and data to thenonvolatile memory device; and the processor writing data to at leastone predetermined register of the nonvolatile memory device.
 19. Thesystem of claim 16, wherein programming the firmware status sectionincludes any selected from the group of: the processor issuing apredetermined instruction to the first nonvolatile memory device and theprocessor writing data to at least one predetermined register of thenonvolatile memory device.
 20. The system of claim 16, wherein: prior toreceiving the new firmware image, the processor is configured to accessa previous firmware image stored in the nonvolatile memory device with achip select signal; and after receiving the new firmware image, theprocessor is configured to access the new firmware image with the samechip select signal.
 21. The system of claim 16, wherein: the nonvolatilememory device includes at least one pool, each pool including aplurality of regions, a mapping history section for the pool, and afirmware status section for the pool.